<template>
    <div>
        <el-table
            v-loading="$store.state.load"
            :data="$store.state.admin.adminLog"
            style="width: 100%">
        <el-table-column
                label="登陆时间"
                width="200">
            <template slot-scope="scope">
                <i class="el-icon-time"></i>
                <span style="margin-left: 10px">{{ scope.row.loginTime |date }}</span>
            </template>
        </el-table-column>
        <el-table-column
                label="管理员账号"
                width="180">
            <template slot-scope="scope">
                <el-popover trigger="hover" placement="top">
                    <p>姓名: {{ scope.row.name }}</p>
                    <p>住址: {{ scope.row.address }}</p>
                    <div slot="reference" class="name-wrapper">
                        <el-tag size="medium">{{ scope.row.adminName }}</el-tag>
                    </div>
                </el-popover>
            </template>
        </el-table-column>
        <el-table-column label="操作">
            <template slot-scope="scope">
                <el-button
                        size="mini"
                        type="danger"
                        @click="$store.dispatch('deleteAdmin',scope.row._id)">删除</el-button>
            </template>
        </el-table-column>
    </el-table>

        <pageInfo action-name="getAdminLog"></pageInfo>

    </div>
</template>

<script>
    export default {
        name: "AdminLog",


    }
</script>

<style scoped>
    .fy{
        margin-left: 200px}

</style>